Method and apparatus for determining the orientation of an accelerometer

ABSTRACT

There is provided a method of determining the orientation of an accelerometer that is being carried or worn by a user, the method comprising measuring acceleration using the accelerometer as the user moves; processing the measured acceleration to determine a step frequency of the movements by the user; and processing the measured acceleration to identify a lateral component of acceleration as a component of acceleration having a high response at a frequency corresponding to half the step frequency.

CROSS-REFERENCE TO PRIOR APPLICATIONS

This application is the U.S. National Phase application under 35 U.S.C.§ 371 of International Application No. PCT/EP2015/060004, filed on May7, 2015, which claims the benefit of European Patent Application No.14167765.8, filed on May 9, 2014. These applications are herebyincorporated by reference in their entirety herein.

TECHNICAL FIELD OF THE INVENTION

The invention relates to apparatus comprising an accelerometer that isbeing carried or worn by a user, and in particular relates to atechnique for determining the orientation of the accelerometer,particularly a lateral component of acceleration in the reference frameof a user.

BACKGROUND TO THE INVENTION

A person's gait describes the characteristics of their walkingbehaviour. More formally, gait is defined as the way locomotion isachieved through use of the legs. While gait appears similar from personto person, there are in fact a number of differences betweenindividuals, so much so that a person's gait can be considered unique,with gait features being used for security applications. Common examplesof gait features include walking speed, cadence, step size and bodysway, but gait can also include minor features such as the angle of thetoes.

Walking is a complex operation, involving the musculoskeletal system,processing of sensory information, coordination and balance. If one ormore of these systems becomes compromised, this will likely be reflectedin changes to a person's gait. It is therefore not surprising that gaitcan be related to a person's health. Some studies have found strongcorrelations between walking speed and becoming functionally dependentin the future. Gait has also been linked to cognitive decline such asAlzheimer's disease.

Gait features can be measured with high accuracy with apparatus such aswalking mats and motion capture cameras, but can also be approximatedusing more portable apparatus, such as those comprising accelerometerswhich can be placed at various points on the body. An accelerometermeasures the acceleration occurring during the movement of the user (andalso the force of gravity) along three orthogonal measurement axes, andthe measurements can be processed to identify the vertical, forward andlateral components of acceleration experienced by the user. The forwardcomponent of acceleration can be used to estimate walking speed, whilestep length can be estimated through the use of an ‘inverted pendulum’model, which also makes use of vertical displacement.

Ideally, the accelerometer is carried or worn by the user in such a waythat the orientation of the accelerometer with respect to the user doesnot change during movement, and the orientation of the accelerometerwith respect to the user is known so that the measurements along themeasurement axes can be transformed (i.e. rotated) to the referenceframe of the user (i.e. the vertical, forward and lateral directions).Even more ideally, the orientation of the accelerometer with respect tothe user is such that the measurement axes of the accelerometer alignwith the vertical, forward and lateral directions of the user, avoidingthe need for a transformation to be performed.

In practice though, the three accelerometer axes will rarely beprecisely aligned with the vertical, lateral and forward directions.This is especially true where the accelerometer is not fixedly attachedto the user's body, e.g. those carried in pockets or worn as a pendant.

It is possible to estimate the vertical component of the accelerationsignal, making use of the constant acceleration caused by gravity, butit is difficult to tell the difference between the lateral and forwardaccelerations without knowing the orientation of the accelerometer.Rotations along the accelerometer's measurement axes cause nomeasureable acceleration, so knowing the orientation of theaccelerometer is difficult without the aid of additional sensors, suchas gyroscopes and/or magnetometers, which are both sensors withcomparatively high power requirements.

US 2010/0161271 describes techniques for determining orientation of athree-axis accelerometer in which acceleration due to gravity ismeasured on each axis x, y, z of the accelerometer and the direction ofgravity is used to associate or align the x-axis of the accelerometerwith gravity, the acceleration not due to gravity is then used toidentify the forward motion and to associate or align the forwarddirection with the y-axis. The remaining direction may be identified asthe sideways direction, which may be associated or aligned with thez-axis. The forward motion can be identified as the accelerometer axisthat has the greatest energy.

A disadvantage with the technique in US 2010/0161271 is that it is basedon the assumption that the (non-vertical) component with the highestenergy is the forward component. However, this assumption only holds fornormal walking speeds (e.g. 5 km/h and above). At lower walking speeds,the energy of the forward and lateral components become increasinglysimilar, which makes it difficult, if not impossible, to distinguish thecomponents using this technique.

Therefore there is a need for an alternative technique for determiningthe lateral component of acceleration from acceleration measurements.

SUMMARY OF THE INVENTION

According to a first aspect of the invention, there is provided a methodof determining the orientation of an accelerometer that is being carriedor worn by a user, the method comprising measuring acceleration usingthe accelerometer as the user moves; processing the measuredacceleration to determine a step frequency of the movements by the user;and processing the measured acceleration to identify a lateral componentof acceleration as a component of acceleration having a high response ata frequency corresponding to half the step frequency.

Preferably, the lateral component of acceleration is a lateral componentof acceleration in the reference frame of the user.

The step frequency is the frequency with which the user takes stepswhile walking.

In some embodiments, the step of processing the measured acceleration toidentify a lateral component of acceleration comprises transforming theacceleration measurements to the frequency domain and identifying thelateral component of acceleration as the component of accelerationhaving a high response at a frequency equal to or within a predeterminedrange of half the step frequency.

In those embodiments, the high response preferably comprises a responseabove a threshold value.

In alternative, preferred, embodiments, the step of processing themeasured acceleration to identify a lateral component of accelerationcomprises determining a set of rotation angles for the measuredacceleration that minimises the autocorrelation of the measuredacceleration in a particular direction at an autocorrelation lag that isat or around half the step frequency; wherein the lateral component ofacceleration comprises the measured acceleration in the particulardirection.

Preferably, the step of determining comprises (i) determining theautocorrelation of the measured acceleration; (ii) calculating theautocorrelation slope and determining the direction in which thesteepest angle of descent in the autocorrelation occurs; (iii) update aset of rotation angles to effect a rotation of the measurement space toreduce the angle between the y-axis in the measurement space and thedetermined direction; (iv) determine the autocorrelation of theacceleration in the rotated measurement space; (v) if theautocorrelation of the acceleration in the rotated measurement space isless than the autocorrelation determined in step (i), rejecting theupdate to the set of rotation angles in step (iii) and repeating steps(iii) and (iv) with a smaller rotation of the measurement space; (vi) ifthe autocorrelation of the acceleration in the rotated measurement spaceis greater than the autocorrelation determined in step (i), determinethe difference between the autocorrelation determined in step (iv) andthe autocorrelation determined in step (i); and (vii) repeat steps (ii)to (vi) if the difference is greater than a threshold value, otherwisedetermining the acceleration in the direction in which the steepestangle of descent occurs in the rotated measurement space to be thelateral component of acceleration.

In some embodiments, the step of processing the measured acceleration todetermine a step frequency of the movements by the user comprisescomputing the magnitude of the measured acceleration; and using a peakdetection algorithm to find the step frequency in the frequency domain.

In alternative embodiments, the step of processing the measuredacceleration to determine a step frequency of the movements by the usercomprises computing the magnitude of the measured acceleration;calculating the autocorrelation of a signal representing the magnitudeof the measured acceleration; identifying the maximum autocorrelation ofthe signal; and identifying a step time for the user as the lagcorresponding to the maximum autocorrelation of the signal.

In some embodiments the method further comprises the steps of processingthe measured acceleration to determine if the user is walking; andprocessing the measured acceleration to identify a lateral component ofacceleration if the user is determined to be walking.

In some embodiments the step of processing the measured acceleration todetermine if the user is walking comprises determining if the determinedstep frequency is within a predetermined range.

According to a second aspect of the invention, there is provided acomputer program product having computer readable code embodied therein,the computer readable code being configured such that, on execution by asuitable computer or processing unit, the computer or processing unit iscaused to perform any of the methods described above.

According to a third aspect of the invention, there is provided anapparatus for determining the orientation of an accelerometer that iscarried or worn by a user, the apparatus comprising a processing unitthat is configured to receive measurements of acceleration from theaccelerometer, process the measured acceleration to determine a stepfrequency of movements by the user; and process the measuredacceleration to identify a lateral component of acceleration as acomponent of acceleration having a high response at a frequencycorresponding to half the step frequency.

Preferably, the lateral component of acceleration is a lateral componentof acceleration in the reference frame of the user.

The step frequency is the frequency with which the user takes stepswhile walking.

In some embodiments, the processing unit is configured to process themeasured acceleration to identify a lateral component of acceleration bytransforming the acceleration measurements to the frequency domain andidentifying the lateral component of acceleration as the component ofacceleration having a high response at a frequency equal to or within apredetermined range of half the step frequency.

In those embodiments, the high response preferably comprises a responseabove a threshold value.

In alternative, preferred, embodiments, the processing unit isconfigured to process the measured acceleration to identify a lateralcomponent of acceleration by determining a set of rotation angles forthe measured acceleration that minimises the autocorrelation of themeasured acceleration in a particular direction at an autocorrelationlag that is at or around half the step frequency; wherein the lateralcomponent of acceleration comprises the measured acceleration in theparticular direction.

Preferably, the processing unit is configured to process the measuredacceleration to identify a lateral component of acceleration by (i)determining the autocorrelation of the measured acceleration; (ii)calculating the autocorrelation slope and determining the direction inwhich the steepest angle of descent in the autocorrelation occurs; (iii)update a set of rotation angles to effect a rotation of the measurementspace to reduce the angle between the y-axis in the measurement spaceand the determined direction; (iv) determine the autocorrelation of theacceleration in the rotated measurement space; (v) if theautocorrelation of the acceleration in the rotated measurement space isless than the autocorrelation determined in step (i), rejecting theupdate to the set of rotation angles in step (iii) and repeating steps(iii) and (iv) with a smaller rotation of the measurement space; (vi) ifthe autocorrelation of the acceleration in the rotated measurement spaceis greater than the autocorrelation determined in step (i), determinethe difference between the autocorrelation determined in step (iv) andthe autocorrelation determined in step (i); and (vii) repeat steps (ii)to (vi) if the difference is greater than a threshold value, otherwisedetermining the acceleration in the direction in which the steepestangle of descent occurs in the rotated measurement space to be thelateral component of acceleration.

In some embodiments, the processing unit is configured to process themeasured acceleration to determine a step frequency of the movements bythe user by computing the magnitude of the measured acceleration; andusing a peak detection algorithm to find the step frequency in thefrequency domain.

In alternative embodiments, the processing unit is configured to processthe measured acceleration to determine a step frequency of the movementsby the user by computing the magnitude of the measured acceleration;calculating the autocorrelation of a signal representing the magnitudeof the measured acceleration; identifying the maximum autocorrelation ofthe signal; and identifying a step time for the user as the lagcorresponding to the maximum autocorrelation of the signal.

In some embodiments the processing unit is further configured to processthe measured acceleration to determine if the user is walking; andprocess the measured acceleration to identify a lateral component ofacceleration if the user is determined to be walking.

In some embodiments the processing unit is configured to process themeasured acceleration to determine if the user is walking by determiningif the determined step frequency is within a predetermined range.

In some embodiments, the processing unit is part of a device thatfurther comprises the accelerometer, and the device is configured to beworn or carried by the user.

In alternative embodiments, the apparatus comprises a sensor unit thatis separate to the processing unit, wherein the sensor unit comprises anaccelerometer and is configured to be worn or carried by the user.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the invention will now be described, by way ofexample only, with reference to the following drawings, in which:

FIG. 1 is illustration of a device according to the invention being wornas a pendant;

FIG. 2 is a block diagram of a device according to an embodiment of theinvention;

FIG. 3 is a graph illustrating the frequency amplitudes of accelerationmeasurements for three measurement axes of an accelerometer obtainedwhile a wearer of the accelerometer is walking;

FIG. 4 is a flow chart illustrating a method according to an embodimentof the invention;

FIG. 5 is a flow chart illustrating a method according to a specificembodiment of the invention; and

FIG. 6 is a heatmap showing the autocorrelation at the step time lagalong the y-axis for all rotation possibilities along the x- and z-axes.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows a device 2 in the form of a pendant that is worn around theneck of a user 4 and FIG. 2 is a block diagram of the device 2. Thedevice 2 can be any type of device where it is necessary or useful toknow the orientation of the device with respect to the horizontal plane.In some embodiments the device 2 is an activity monitor that monitorsthe physical activity of the user 4, for example for personal fitnesspurposes, or for supporting injury or fall prevention, for exampleduring walking. The device 2 may be for monitoring steps or walking bythe user 4 and identifying gait parameters, including where theparameters are used as a biometric for identifying an individual, or thedevice 2 may be for detecting other forms of traversing to walking, suchas running, hopping, etc.). In other embodiments, the device 2 can beused for other purposes, for example it can be a step counter, avelocity monitor, a stability monitor, a fall detector or a smart phone.

The device 2 comprises at least one accelerometer 6 that measures themovements of the device 2 and that is in a fixed relationship withrespect to the rest of the device 2 (i.e. the accelerometer 6 does notmove in the device 2). The at least one accelerometer 6 measures themagnitude and direction of the acceleration acting on the device 2. Theaccelerometer 6 measures the accelerations in three dimensions andoutputs a signal for three orthogonal axes (e.g. denoted x, y and zaxes) indicating the magnitude of the acceleration acting along thataxis over time. The accelerometer 6 measures the acceleration at apredetermined sampling frequency, for example 50 Hz, although othersampling frequencies can be used. It will be appreciated that instead ofan accelerometer 6 that measures acceleration in three dimensions, thedevice 2 can comprise three accelerometers that measure the accelerationin one direction that are arranged orthogonally or roughly orthogonallyto each other.

The device 2 further comprises a processing unit 8 that receives theacceleration measurements from the accelerometer 6 and processes themeasurements to determine the orientation of the device 2. In someembodiments, the processing unit 8 determines the orientation of thedevice 2 in order to identify one or more of the vertical, forward andlateral components of acceleration in the acceleration measurements.

The device 2 also comprises a memory module 10 that can be used to storecomputer readable code or instructions for execution by the processingunit 8 in order to cause the processing unit 8 to process theacceleration measurements according to the invention. The memory module10 can also be used to store the acceleration measurements before,during and after the processing by the processing unit 8 and anyintermediate products of the processing.

Although in the preferred embodiment of the invention the device 2 is inthe form of a pendant to be worn on a cord or thread around the neck ofa user 4, it will be appreciated that the device 2 can be implemented inalternative forms that are to be worn on or carried by different partsof the body of the user 4, such as at the waist, on the chest, arm,wrist, leg or ankle.

In this illustrated embodiment of the invention, the device 2 comprisesa single unit that is worn by the user 4 and that collects and processesthe acceleration measurements. In alternative embodiments, theprocessing of the measurements can be performed in a unit that is remotefrom the accelerometer 6 (for example a unit that is worn on a differentpart of the body of the user 4, a base unit or computer that can belocated in the user's home, or a remote server located in the premisesof a healthcare service provider), in which case the device 2 willcomprise a sensor unit to be worn by the user 4 that comprises suitabletransmitter or transceiver circuitry for transmitting the measurementsto the remote unit. In this embodiment, there is no need for theuser-worn sensor unit to include a processing unit that is capable ofprocessing the measurements to determine the orientation of the sensorunit.

It will be appreciated that in practical implementations, the device 2may comprise other or further components to those shown in FIG. 2 anddescribed above, such as a user interface that allows the user toactivate and/or operate the device 2, and a power supply, such as abattery, for powering the device 2.

Although it is not currently feasible to establish the full orientationof an accelerometer (i.e. including the lateral and forward components)in all circumstances based on acceleration measurements alone, it hasbeen found that it is possible to establish the full orientation of anaccelerometer when the user is walking. In particular, the inventiontakes advantage of the gait (i.e. walking patterns) of the user sincewalking is, by nature, a highly cyclic pattern, and successive steps arehighly similar to one another, and as such, the correspondingmeasurements of acceleration are also highly similar as well.

FIG. 3 is a graph showing the frequency amplitudes (i.e. amplitudes inthe frequency domain) of acceleration measurements for three individualmeasurement axes (x-, y- and z-) obtained while the wearer of theaccelerometer is walking. In this Figure, the x-axis is known tocorrespond to the vertical direction, the y-axis is known to correspondto the lateral direction and the z-axis is known to correspond to theforward direction. It can be seen from the analysis in the frequencydomain that the x- and z-axes show a high frequency response (i.e. apeak or a high magnitude/amplitude in the frequency spectrum of theacceleration signal) which matches (i.e. occurs at) the step frequency(i.e. the frequency with which the user's feet strike the ground whilewalking, approximately 1.7 Hz in this case). In the general case wherenone of the measurement axes are aligned or closely aligned to thelateral direction, all three axes will show a high frequency response(i.e. a high response or a peak in the frequency domain) which matches(i.e. occurs at) the step frequency.

It can also be seen from FIG. 3 that the lateral (y-) component alsoshows a response (i.e. peak) at half the step frequency. This responseis due to the fact that, regardless of whether a step is made with theleft or right foot, the forward and vertical accelerations will beroughly similar. The lateral motion however corresponds to the userswaying alternately from left to right, which yields an inverted signalfor each step. This swaying results in a periodic signal with twice theperiod of the step time, and therefore at half its frequency (the stepfrequency).

Thus the inventors have found that the lateral component of accelerationcan be found regardless of orientation by maximizing the frequencyresponse (response in the frequency domain) of a component ofacceleration at half the step frequency.

Clearly this technique avoids the need to use another sensor such as agyroscope or magnetometer to determine the horizontal components ofacceleration, and the increases in power consumption that the use ofthose sensors cause. A further advantage over gyroscope-based methods isthere is no measurement drift which is common in gyroscopes. If theaccelerometer changes orientation while walking, this can be correctedrelatively quickly using the invention.

FIG. 4 is a flow chart illustrating a general embodiment of theinvention. In a first step, step 101, measurements of acceleration areobtained using an accelerometer 6 that is being worn or carried by auser 4.

In step 103, a step frequency for the user's movements is determinedfrom the acceleration measurements.

Those skilled in the art will be aware of various techniques fordetermining step frequency (or step time). In some implementations, thestep time can be found by computing the magnitude of the accelerometermeasurements, i.e.magnitude=√(a _(x) ² +a _(y) ² +a _(z) ²)and using a peak detection algorithm to find the step frequency in thefrequency domain (which can of course be converted to step time). Inthis implementation, the magnitude signal is transformed to thefrequency domain, and the highest value within the appropriate frequencyband (e.g. 1-2.5 Hz) is selected.

In other implementations, autocorrelation can be used to find the steptime. Auto correlation determines how well a signal correlates to itselfshifted by a number of positions, known as ‘lag’. A maximumautocorrelation of the time-domain magnitude signal can be identifiedwithin a certain lag interval (i.e. a range of acceptable lag), with thelag corresponding to the maximum autocorrelation providing the steptime.

Those skilled in the art will be aware of other techniques ormodifications to the above techniques (e.g. that the peak must be acertain amount above the noise level) that can be used to identify thestep time or step frequency.

Once the step frequency/step time has been identified, the measuredacceleration is processed to identify the lateral component ofacceleration based on the finding that the lateral component ofacceleration is a component of acceleration having a high response at afrequency corresponding to half the step frequency (step 105).

In some embodiments, the lateral component of acceleration can be foundby transforming acceleration measurements to the frequency domain (forexample using a fast Fourier transform) and identifying which of theaxes has a high response in the frequency domain at a frequency equal toor around half the step frequency. The high response can be identifiedas a response (i.e. magnitude of the acceleration signal in thefrequency domain) greater than a threshold value, or the axis with thehighest response at a frequency equal to or around half the stepfrequency. In order to identify the lateral component of acceleration,the high response may be required to be found at exactly half the stepfrequency, or within a predetermined range of half of the stepfrequency. It will be appreciated that these embodiments are generallyonly reliable when one of the accelerometer axes is aligned or roughlyaligned with the lateral direction, and precludes the finding of thelateral component of acceleration as a linear combination of theaccelerometer axes. Thus these embodiments are not preferred in thegeneral situation where the accelerometer 6 has an arbitrary orientationwith respect to the user.

The flow chart in FIG. 5 illustrates a preferred embodiment ofdetermining the lateral component of acceleration according to theinvention. This algorithm is based on the principle that the lateralcomponent of acceleration is the component of acceleration having a highresponse (peak) in the frequency domain at a frequency corresponding tohalf the step frequency, but uses autocorrelation rather than atransformation to the frequency domain (such as a fast Fouriertransform), as using autocorrelation is computationally faster. With alag equal to the step time, autocorrelation is expected to be positivefor the forward and vertical components (as the acceleration signalrepeats itself) and negative for the lateral component (as theacceleration signal is at half its period).

In step 121, acceleration measurements are obtained. Next, the step timeor step frequency is determined (step 123). Step 123 can be performed asdescribed above for step 103.

As noted above, the measurement axes of the accelerometer 6 are referredto as ‘x’, ‘y’ and ‘z’. Ideally, the x-axis aligns with the verticalcomponent (in the reference frame of the user), the y-axis aligns withthe lateral component (in the user's frame of reference) and the z-axisaligns with the forward component (in the user's frame of reference),although alternative ideal orientations exist.

The aim of the method in FIG. 5 is to determine how the lateralcomponent (in the user's frame of reference) can be formulated as alinear combination of the x, y, and z axes, by determining for whichlinear combination of the x, y, and z axes the response in the frequencydomain at half the step frequency is maximal. To do so, the method ofFIG. 5 provides that the accelerometer measurement axes are virtuallyrotated around the x- and z-axes until the y-axis aligns with thelateral component (rotating along the y-axis does not change theorientation of the y-axis itself). Since the x, y and z axes areorthogonal to each other, they can be viewed as a 3D Cartesiancoordinate space; that is the general three-dimensional space wherepoints are given by a vector of three values that indicate theirdistance from the origin along the respective axes. The methods used torotate a Cartesian space can also be used to rotate (virtually) theaccelerometer measurement axes (hence the term ‘rotating the space’ inthe following description).

Rotation of a point in a 3D Cartesian space is a linear transformation,i.e. it can be achieved by multiplying a 3×3 rotation matrix with the 3Dcoordinate of the point. There are a number of ways of deriving such amatrix from a set of rotation parameters, for instance by deriving itfrom three rotation values along the x, y, and z axes respectively. Byapplying the rotation to each set of (x, y, z) accelerometermeasurements, the accelerometer axes are effectively rotated to a new,virtual set of axes, which can for instance be called x′, y′, and z′.The aim is then to find a set of rotation angles such that y′ is alignedwith the lateral component.

Thus, to find the lateral component of acceleration, the autocorrelationof the signal along the y-axis is minimised by rotating thethree-dimensional space along the x- and z-axes. This leads to they-axis being aligned with the lateral component.

To find the lateral component, the autocorrelation of the accelerationmeasurements is determined for each of the measurement axes of theaccelerometer 6 (step 125) and the slope of the autocorrelation iscalculated (step 127). Minimizing the autocorrelation can be achievedusing a hill-climbing algorithm which involves determining the steepestangle of descent given the current space orientation.

Once the steepest angle of descent is determined for the current spaceorientation, the rotation variables are updated in order to effect arotation of the space such that the angle between the y-axis of themeasurement space (in it's current orientation) and the determineddirection is reduced (step 129).

Then, in step 131, the space is rotated using the updated rotationvariables and the autocorrelation is recalculated. The process thenreturns to step 127 where the slope of the autocorrelation isdetermined.

Steps 127-131 are repeated until no more significant decreases inautocorrelation can be obtained. In some embodiments, this is determinedby the difference between the recalculated autocorrelation and theprevious autocorrelation value being less than a threshold value (i.e.after step 131 the difference between the recalculated autocorrelationand the previous autocorrelation value is determined, and if thisdifference is greater than the threshold value then the method returnsto step 127, otherwise the method moves to step 133). In someembodiments, if the recalculated autocorrelation is less than theprevious autocorrelation value, the update to the set of rotationangles/variables that led to the recalculated autocorrelation isrejected and a smaller rotation of the measurement space is effectedinstead.

In step 133, it is determined that as no more significant decreases inautocorrelation can be obtained, the y-axis is aligned with the lateralcomponent (as the autocorrelation-space is smooth, as shown in FIG.6—which shows a heatmap of the autocorrelation at the step time lagalong the y-axis for all rotation possibilities along the x- andz-axes). It will be noted from FIG. 6 that the lack of local minima ormaxima allows a hill-descent-type algorithm to reliably find the optimalrotation that minimises the autocorrelation (rotation angles are givenin radians).

Hill-climbing algorithm in steps 127-131: Hill-climbing is one of apossible number of ways to arrive at a set of rotation angles thatmaximises some criteria, in this case a large negative autocorrelationon the y-axis at the appropriate autocorrelation lag. The algorithmstarts with an initial set of rotation angles, finds in which‘direction’ the criteria improves the fastest (i.e. the steepestslope)—step 127, updates the rotation angles in this direction (step129), and repeats until the criteria cannot be increased further.

As rotation along the y-axis will not affect its orientation, onlyrotation along the x and z axes needs to be considered. These tworotation values can be considered as a two-dimensional point in space,which can move in a certain direction by changing the values. Toestimate the slope (step 127), for example, four points around therotation values can be chosen, two on either side of the x-rotation, andtwo on either side of the z-rotation. The new points should be fairlyclose to the original point.

The criteria scores can then be calculated for the new points, the pointwith the highest criteria score can be found, and a certain distance canbe moved in that direction. In practice, step 129 comprises adding orsubtracting some value from one of the rotation angles and updating therotation matrix, and step 131 comprises computing a new rotation anddetermining autocorrelation values. This can either be a fixed value, orsome formula can be used to derive a distance value. The direction movedin can be a composite of directions which improved the criteria. Also,more than four points can be used if desired.

If the new set of rotation angles is an improvement, this set is keptand the process to select four new points starts again. If it is not animprovement, the new points are rejected, a smaller distance movement inthe same direction is tried instead. The algorithm is ended when nosubstantial improvements are made, either because no directions can befound that yield improvement, or because the distance travelled hasbecome so small that no real progress is made.

The initial set of rotation angles can be important, but if the searchspace is such that the highest criterion is always found from anyinitial position, this is not a concern. It can be seen from FIG. 6 thatthis is the case here. Practically this means that the algorithm alwaysaligns with the lateral component, regardless of the originalorientation of the y-axis.

Once the lateral component of acceleration is obtained in step 105 or133, the vertical and forward components can then be aligned throughgravity-estimation techniques, which are known in the art. Inparticular, gravity-estimation techniques can be used to identify thevertical component of acceleration, which leaves the remaining componentas the forward component. Alternatively, it is possible to determine thevertical component using such techniques before attempting to identifythe lateral component, and then find the lateral component through thetechniques described above. In some cases finding the vertical componentfirst is more advantageous, as there are less degrees of freedom whenfinding the lateral component, particularly where the rotation matrix is‘brute forced’ (i.e. the best autocorrelation is computed for a fixedset of rotation angles).

It will be appreciated that the method according to the invention iseffective when the user is walking or performing a similar type ofmovement (e.g. jogging, running, etc.). Therefore, in any of the aboveembodiments, a check of the acceleration measurements can be performedto determine if the user's movements correspond to walking and thuswhether the determined orientation of the accelerometer 6 can beconsidered reliable. This check can be performed at any point in theabove methods, for example prior to step 103 in the embodiment of FIG. 4and prior to step 123 in the embodiment of FIG. 5. This check of theacceleration measurements can comprise, for example, performing patternmatching of the acceleration measurements to known patterns for walking,or checking for a step frequency in an appropriate band (e.g. 1-2.5 Hz),although those skilled in the art will be aware of other techniques thatcan be used to identify if the user is walking from the accelerometermeasurements. It will be appreciated that the second of these exampleswould be performed after step 103 in FIG. 4 and step 123 in FIG. 5. Ifthe test suggests that the user is not walking (or jogging, running,etc.), the processing of the acceleration measurements to determine thelateral orientation can be stopped or the determined orientationdiscarded as unreliable.

There is therefore provided a technique that can reliably identify thelateral component of acceleration in acceleration measurements by anaccelerometer that is attached to or being carried by a user that iswalking.

While the invention has been illustrated and described in detail in thedrawings and foregoing description, such illustration and descriptionare to be considered illustrative or exemplary and not restrictive; theinvention is not limited to the disclosed embodiments.

Variations to the disclosed embodiments can be understood and effectedby those skilled in the art in practicing the claimed invention, from astudy of the drawings, the disclosure, and the appended claims. In theclaims, the word “comprising” does not exclude other elements or steps,and the indefinite article “a” or “an” does not exclude a plurality. Asingle processor or other unit may fulfil the functions of several itemsrecited in the claims. The mere fact that certain measures are recitedin mutually different dependent claims does not indicate that acombination of these measures cannot be used to advantage. A computerprogram may be stored/distributed on a suitable medium, such as anoptical storage medium or a solid-state medium supplied together with oras part of other hardware, but may also be distributed in other forms,such as via the Internet or other wired or wireless telecommunicationsystems. Any reference signs in the claims should not be construed aslimiting the scope.

The invention claimed is:
 1. A method of determining the orientation ofan accelerometer that is being carried or worn by a user, the methodcomprising: measuring acceleration using the accelerometer as the usermoves; processing the measured acceleration to determine a stepfrequency of the movements by the user; and processing the measuredacceleration to identify a lateral component of acceleration as acomponent of acceleration having a high response at a frequencycorresponding to half the step frequency.
 2. The method as claimed inclaim 1, wherein the step of processing the measured acceleration toidentify a lateral component of acceleration comprises: determining aset of rotation angles for the measured acceleration that minimizes theautocorrelation of the measured acceleration in a particular directionat an autocorrelation lag that is at or around half the step frequency;wherein the lateral component of acceleration comprises the measuredacceleration in the particular direction.
 3. The method as claimed inclaim 2, wherein the step of determining comprises: (i) determining theautocorrelation of the measured acceleration; (ii) calculating theautocorrelation slope and determining the direction in which thesteepest angle of descent in the autocorrelation occurs; (iii) update aset of rotation angles to effect a rotation of the measurement space toreduce the angle between the y-axis in the measurement space and thedetermined direction; (iv) determine the autocorrelation of theacceleration in the rotated measurement space; (v) if theautocorrelation of the acceleration in the rotated measurement space isless than the autocorrelation determined in step (i), rejecting theupdate to the set of rotation angles in step (iii) and repeating steps(iii) and (iv) with a smaller rotation of the measurement space; (vi) ifthe autocorrelation of the acceleration in the rotated measurement spaceis greater than the autocorrelation determined in step (i), determinethe difference between the autocorrelation determined in step (iv) andthe autocorrelation determined in step (i); and (vii) repeat steps (ii)to (vi) if the difference is greater than a threshold value, otherwisedetermining the acceleration in the direction in which the steepestangle of descent occurs in the rotated measurement space to be thelateral component of acceleration.
 4. The method as claimed in claim 1,wherein the step of processing the measured acceleration to identify alateral component of acceleration comprises transforming theacceleration measurements to the frequency domain and identifying thelateral component of acceleration as the component of accelerationhaving a high response at a frequency equal to or within a predeterminedrange of half the step frequency.
 5. The method as claimed in claim 1,wherein the step of processing the measured acceleration to determine astep frequency of the movements by the user comprises: computing themagnitude of the measured acceleration; and using a peak detectionalgorithm to find the step frequency in the frequency domain.
 6. Themethod as claimed in claim 1, wherein the step of processing themeasured acceleration to determine a step frequency of the movements bythe user comprises: computing the magnitude of the measuredacceleration; calculating the autocorrelation of a signal representingthe magnitude of the measured acceleration; identifying the maximumautocorrelation of the signal; and identifying a step time for the useras the lag corresponding to the maximum autocorrelation of the signal.7. The method as claimed in claim 1, further comprising the steps of:processing the measured acceleration to determine if the user iswalking; and processing the measured acceleration to identify a lateralcomponent of acceleration if the user is determined to be walking. 8.The method as claimed in claim 1, wherein the step of processing themeasured acceleration to determine if the user is walking comprisesdetermining if the determined step frequency is within a predeterminedrange.
 9. A non-transitory computer readable medium encoded withcomputer readable instructions which when executed by a processor causethe processor to: receive an acceleration measurement measured using anaccelerometer as a user moves, process the measured acceleration todetermine a step frequency of the movements by the user, and process themeasured acceleration to identify a lateral component of acceleration asa component of acceleration having a high response at a frequencycorresponding to half the step frequency.
 10. An apparatus, comprising:an accelerometer carried or worn by a user; and a processing unit thatis configured to: receive measurements of acceleration from theaccelerometer; process the measured acceleration to determine a stepfrequency of movements by the user; and process the measuredacceleration to identify a lateral component of acceleration as acomponent of acceleration having a high response at a frequencycorresponding to half the step frequency.
 11. The apparatus as claimedin claim 10, wherein the processing unit is configured to process themeasured acceleration to identify a lateral component of accelerationby: determining a set of rotation angles for the measured accelerationthat minimizes the autocorrelation of the measured acceleration in aparticular direction at an autocorrelation lag that is at or around halfthe step frequency; wherein the lateral component of accelerationcomprises the measured acceleration in the particular direction.
 12. Theapparatus as claimed in claim 10, wherein the processing unit isconfigured to process the measured acceleration to identify a lateralcomponent of acceleration by (i) determining the autocorrelation of themeasured acceleration; (ii) calculating the autocorrelation slope anddetermining the direction in which the steepest angle of descent in theautocorrelation occurs; (iii) update a set of rotation angles to effecta rotation of the measurement space to reduce the angle between they-axis in the measurement space and the determined direction; (iv)determine the autocorrelation of the acceleration in the rotatedmeasurement space; (v) if the autocorrelation of the acceleration in therotated measurement space is less than the autocorrelation determined instep (i), rejecting the update to the set of rotation angles in step(iii) and repeating steps (iii) and (iv) with a smaller rotation of themeasurement space; (vi) if the autocorrelation of the acceleration inthe rotated measurement space is greater than the autocorrelationdetermined in step (i), determine the difference between theautocorrelation determined in step (iv) and the autocorrelationdetermined in step (i); and (vii) repeat steps (ii) to (vi) if thedifference is greater than a threshold value, otherwise determining theacceleration in the direction in which the steepest angle of descentoccurs in the rotated measurement space to be the lateral component ofacceleration.
 13. The apparatus as claimed in claim 10, wherein theprocessing unit is configured to process the measured acceleration todetermine a step frequency of the movements by the user by computing themagnitude of the measured acceleration; and using a peak detectionalgorithm to find the step frequency in the frequency domain.
 14. Theapparatus as claimed in claim 10, wherein the processing unit isconfigured to process the measured acceleration to determine a stepfrequency of the movements by the user by computing the magnitude of themeasured acceleration; calculating the autocorrelation of a signalrepresenting the magnitude of the measured acceleration; identifying themaximum autocorrelation of the signal; and identifying a step time forthe user as the lag corresponding to the maximum autocorrelation of thesignal.
 15. The apparatus as claimed in claim 10, wherein the processingunit is further configured to process the measured acceleration todetermine if the user is walking; and process the measured accelerationto identify a lateral component of acceleration if the user isdetermined to be walking.